<template>
	<view class="">
		<!-- <view class="">
			考评人:{{Evaluator}}
		</view> -->
		<view v-show="thisview">
			<select-lay :value="user.nowmonth" name="" slabel="month" svalue="value" placeholder="请选择月份"
				:options="user.monthvalue" @selectitem="selectmonth" v-show="selectlay"></select-lay>
			<uni-data-picker placeholder="请选择您的所在地" v-model="user.data" :localdata="user.localdata"
				@change="changePicker" :step-searh="false" :preload="true" popup-title="请选择考评对象" @popupopened="clear"
				v-show="unidatapicker"></uni-data-picker>
			<button @click="getl" v-show="btngetl">获取定位</button>
			<view class="" v-show="islocation">当前位置:{{thislocation}}</view>
			<view class="">code:{{res}}</view>

		</view>
		<br>
		<scroll-view scroll-y="true">
			<view class="ddkk" id="targetDom">
				<view class="onetwo" v-for="(i,index) in listfirst" :key="listfirst.id" @click="clickfirst(i,index)"
					v-show="islistfirst">
					<view class="table">{{i.name}}</view>
				</view>
				<view class="onetwo" v-for="(i,index) in listsecond" :key="listsecond.id" @click="clicksecond(i,index)"
					v-show="islistsecond">
					<view class="table">{{i.name}}</view>
				</view>
			</view>
		</scroll-view>
		<br>
		<br>
		<br>
		<br>
		<br>
		<view class="bottom-btn">
			<button v-if="isbtn" @click="start" :disabled="kkp">开始考评</button>
			<button v-else @click="end">结束考评</button>
		</view>

	</view>
</template>

<script>
	// import FormData from 'form-data'

	export default {

		data() {
			return {
				len:[],
				iiidex:[],
				res:null,
				faildocument:[],
				thisview: true,
				selectlay: true,
				unidatapicker: false,
				btngetl: false,
				islocation: false,
				kkp: true,
				all: [],
				isbtn: true,
				islistsecond: false,
				islistfirst: false,
				thislocation: '',
				locaval: '',
				isclear:true,
				isstart: true,
				islocation: false,
				taddress: '',
				isflag: '',
				Evaluator: '',
				asd: 'asdasdasdasda',
				n: 2,
				latitude: '', //纬度
				longitude: '', //经度
				time: '',
				Image2: '',
				name: '',
				update: true,
				dat: '88888',
				showw: true,
				showobj: false,
				showlocation: false,
				showtest: false,
				listsecond: [{
						id: '1',
						name: '村屯道路'
					},
					{
						id: '2',
						name: '建筑风貌'
					},
					{
						id: '3',
						name: '畜禽饲养'
					},
					{
						id: '4',
						name: '公益宣传与户外广告'
					},
					{
						id: '5',
						name: '园林绿地'
					},
					{
						id: '6',
						name: '公共场所'
					},
					{
						id: '7',
						name: '公共设施'
					},
					{
						id: '8',
						name: '建筑工地'
					},
					{
						id: '9',
						name: '村庄水域'
					},
					{
						id: '10',
						name: '村屯田园'
					}
					// {
					// 	id: '11',
					// 	name: '其他'
					// }
				],
				listfirst: [{
						id: '1',
						name: '道路',
					},
					{
						id: '2',
						name: '建筑景观'
					},
					{
						id: '3',
						name: '照明设施'
					},
					{
						id: '4',
						name: '公益宣传与户外广告'
					},
					{
						id: '5',
						name: '园林绿地'
					},
					{
						id: '6',
						name: '居住区'
					},
					{
						id: '7',
						name: '公共场所'
					},
					{
						id: '8',
						name: '公共设施'
					},
					{
						id: '9',
						name: '农贸市场'
					},
					{
						id: '10',
						name: '建筑工地'
					},
					{
						id: '11',
						name: '水域'
					},
					{
						id: '12',
						name: '乡镇田园'
					},
					{
						id: '13',
						name: '污水、垃圾处理设施'
					}
					// {
					// 	id: '14',
					// 	name: '其他'
					// }
				],
				user: {
					monthvalue: [{
							month: "1月",
							value: "1"
						},
						{
							month: "2月",
							value: "2"
						},
						{
							month: "3月",
							value: "3"
						},
						{
							month: "4月",
							value: "4"
						},
						{
							month: "5月",
							value: "5"
						},
						{
							month: "6月",
							value: "6"
						},
						{
							month: "7月",
							value: "7"
						},
						{
							month: "8月",
							value: "8"
						},
						{
							month: "9月",
							value: "9"
						},
						{
							month: "10月",
							value: "10"
						},
						{
							month: "11月",
							value: "11"
						},
						{
							month: "12月",
							value: "12"
						}
					],
					nowmonth: "",
					thismonth: '',
					address: '',
					localdata: [{
						text: '青秀区',
						value: 'qx',
						children: [{
								text: '长塘镇',
								value: 'A',
								children: [{
										text: '长塘镇',
										value: 'special'
									},
									{
										text: '定西村',
										value: 'A1',
										children: [{
												text: '加踏坡',
												value: 'a'
											},
											{
												text: '团岩坡',
												value: 'a'
											},
											{
												text: '定西坡',
												value: 'b'
											},
											{
												text: '仲豆坡',
												value: 'b'
											},
											{
												text: '巴苗坡',
												value: 'b'
											},
											{
												text: '楞仲坡',
												value: 'c'
											},
											{
												text: '吊思坡',
												value: 'c'
											}
										],
									},
									{
										text: '洞江村',
										value: 'A2',
										children: [{
												text: '青龙坡',
												value: 'a'
											},
											{
												text: '洞江村',
												value: 'b'
											},
											{
												text: '冲什坡',
												value: 'c'
											},
											{
												text: '王村坡',
												value: 'c'
											}
										]

									},
									{
										text: '枫木村',
										value: 'A3',
										children: [{
												text: '广柏坡',
												value: 'b'
											},
											{
												text: '枫木坡',
												value: 'b'
											},
											{
												text: '石龙坡',
												value: 'b'
											},
											{
												text: '葛岭坡',
												value: 'c'
											},
											{
												text: '大盆坡',
												value: 'c'
											},
											{
												text: '马王塘坡',
												value: 'c'
											},
											{
												text: '梁村坡',
												value: 'c'
											},
											{
												text: '公敲坡',
												value: 'c'
											},
											{
												text: '关塘坡',
												value: 'c'
											},
											{
												text: '扶尧坡',
												value: 'c'
											},
											{
												text: '上石牛坡',
												value: 'c'
											},
											{
												text: '下石牛坡',
												value: 'c'
											},
											{
												text: '六笃坡',
												value: 'c'
											},
											{
												text: '朝阳坡',
												value: 'c'
											},
											{
												text: '垒岩坡',
												value: 'c'
											},
											{
												text: '朝基坡',
												value: 'c'
											}
										]
									},
									{
										text: '那曾村',
										value: 'A4',
										children: [{
												text: '昌介坡',
												value: 'b'
											},
											{
												text: '谷塘坡',
												value: 'b'
											},
											{
												text: '那立坡',
												value: 'b'
											},
											{
												text: '那曾坡',
												value: 'c'
											},
											{
												text: '天堂坡',
												value: 'c'
											},
											{
												text: '那农坡',
												value: 'c'
											},
											{
												text: '白沙坡',
												value: 'c'
											},
											{
												text: '合江坡',
												value: 'c'
											},
											{
												text: '湴塘坡',
												value: 'c'
											},
											{
												text: '沙坪坡',
												value: 'c'
											},
											{
												text: '三圭坡 ',
												value: 'c'
											},
											{
												text: '石碑坡',
												value: 'c'
											},
											{
												text: '新塘坡',
												value: 'c'
											},
											{
												text: '高平坡 ',
												value: 'c'
											}
										]
									},
									{
										text: '天堂村',
										value: 'A5',
										children: [{
												text: '巴兰坡',
												value: 'a'
											},
											{
												text: '幸福坡',
												value: 'a'
											},
											{
												text: '旧天堂坡',
												value: 'b'
											},
											{
												text: '坛尧坡',
												value: 'b'
											},
											{
												text: '六留坡',
												value: 'b'
											},
											{
												text: '新天堂坡',
												value: 'b'
											},
											{
												text: '六佔坡',
												value: 'b'
											},
											{
												text: '那才坡',
												value: 'c'
											}
										]
									},
									{
										text: '长大村',
										value: 'A5',
										children: [{
												text: '长大上坡',
												value: 'b'
											},
											{
												text: '那叩坡',
												value: 'b'
											},
											{
												text: '细东瓜坡',
												value: 'b'
											},
											{
												text: '长大下坡',
												value: 'b'
											},
											{
												text: '高塘坡',
												value: 'c'
											},
											{
												text: '大东瓜坡',
												value: 'c'
											},
											{
												text: '含坭坡',
												value: 'c'
											}
										]
									},
									{
										text: '长塘村',
										value: 'A6',
										children: [{
												text: '那念坡',
												value: 'a'
											},
											{
												text: '王里坡',
												value: 'a'
											},
											{
												text: '佛子坡',
												value: 'b'
											},
											{
												text: '天窝坡',
												value: 'b'
											},
											{
												text: '布柳坡',
												value: 'b'
											},
											{
												text: '六侣内坡',
												value: 'b'
											},
											{
												text: '六侣外坡',
												value: 'b'
											},
											{
												text: '长塘街',
												value: 'c'
											},
											{
												text: '新坡',
												value: 'c'
											},
											{
												text: '那逢坡',
												value: 'c'
											}
										]
									},
								],
							},
							{
								text: '伶俐镇',
								value: 'B',
								children: [{
										text: '伶俐镇',
										value: 'special'
									},
									{
										text: '独领村',
										value: 'B1',
										children: [{
												text: '渌口坡',
												value: 'a'
											},
											{
												text: '伶秀坡',
												value: 'a'
											},
											{
												text: '独岭坡',
												value: 'a'
											},
											{
												text: '咘蒙坡',
												value: 'a'
											},
											{
												text: '玉村坡',
												value: 'b'
											},
											{
												text: '石桥坡',
												value: 'b'
											},
											{
												text: '定温坡',
												value: 'b'
											},
										]
									},
									{
										text: '伶俐村',
										value: 'B2',
										children: [{
												text: '伶俐街',
												value: 'a'
											},
											{
												text: '通水坡',
												value: 'a'
											},
											{
												text: '武玲坡',
												value: 'a'
											},
											{
												text: '那车坡',
												value: 'a'
											},
											{
												text: '南蛇坡',
												value: 'b'
											}
										]
									},
									{
										text: '那樟村',
										value: 'B3',
										children: [{
												text: '下樟坡',
												value: 'a'
											},
											{
												text: '晚英坡',
												value: 'b'
											},
											{
												text: '上樟坡',
												value: 'b'
											},
											{
												text: '中旧坡',
												value: 'b'
											},
											{
												text: '石龙坡',
												value: 'b'
											},
											{
												text: '公台坡',
												value: 'b'
											},
											{
												text: '下旧坡',
												value: 'b'
											},
											{
												text: '汁里坡',
												value: 'c'
											},
											{
												text: '上旧坡',
												value: 'c'
											},
											{
												text: '那深坡',
												value: 'c'
											}
										]
									},
									{
										text: '上王村',
										value: 'B4',
										children: [{
												text: '下王坡',
												value: 'a'
											},
											{
												text: '下坛坡',
												value: 'a'
											},
											{
												text: '蕉芭坡',
												value: 'a'
											},
											{
												text: '新兴坡',
												value: 'a'
											},
											{
												text: '六阳坡',
												value: 'b'
											},
											{
												text: '上王坡',
												value: 'b'
											},
											{
												text: '中王坡',
												value: 'b'
											},
											{
												text: '六移坡',
												value: 'c'
											},
											{
												text: '上坛坡',
												value: 'c'
											},
											{
												text: '王岭坡',
												value: 'c'
											},
											{
												text: '官乙坡',
												value: 'c'
											},
											{
												text: '大水坡',
												value: 'c'
											},
											{
												text: '马笃坡',
												value: 'c'
											},
											{
												text: '沙江坡',
												value: 'c'
											}
										]
									},
									{
										text: '石塘村',
										value: 'B5',
										children: [

											{
												text: '石塘坡',
												value: 'a'
											},
											{
												text: '李坡',
												value: 'a'
											},
											{
												text: '潘坡',
												value: 'b'
											},
											{
												text: '三乐坡',
												value: 'b'
											}
										]
									},
									{
										text: '沱江村',
										value: 'B6',
										children: [

											{
												text: '沱江坡',
												value: 'a'
											},
											{
												text: '武罗坡',
												value: 'b'
											},
											{
												text: '三唛坡',
												value: 'b'
											},
											{
												text: '六挞坡',
												value: 'b'
											},
											{
												text: '坛青坡',
												value: 'b'
											},
											{
												text: '三滩坡',
												value: 'b'
											},
											{
												text: '大乙坡',
												value: 'b'
											},
											{
												text: '武杏坡',
												value: 'c'
											},
											{
												text: '大木坡',
												value: 'c'
											}
										]
									},
									{
										text: '王京村',
										value: 'B7',
										children: [

											{
												text: '汶水坡',
												value: 'a'
											},
											{
												text: '王京坡',
												value: 'a'
											},
											{
												text: '巴田坡',
												value: 'a'
											}
										]
									},
									{
										text: '望齐村',
										value: 'B8',
										children: [

											{
												text: '望齐坡',
												value: 'a'
											},
											{
												text: '赤城坡',
												value: 'a'
											},
											{
												text: '水通坡',
												value: 'b'
											},
											{
												text: '冲辽坡',
												value: 'b'
											},
											{
												text: '驮均坡',
												value: 'b'
											},
											{
												text: '那安坡',
												value: 'b'
											},
											{
												text: '六安坡',
												value: 'b'
											},
											{
												text: '大塘坡',
												value: 'b'
											},
											{
												text: '新吴坡',
												value: 'c'
											}
										]
									}
								]
							},
							{
								text: '南阳镇',
								value: 'C',
								children: [{
										text: '南阳镇',
										value: 'special'
									},
									{
										text: '二田村',
										value: 'C1',
										children: [

											{
												text: '新杏坡',
												value: 'a'
											},
											{
												text: '田挺坡',
												value: 'a'
											},
											{
												text: '上田坡',
												value: 'b'
											},
											{
												text: '下田坡',
												value: 'b'
											},
											{
												text: '新荐坡',
												value: 'b'
											}
										]
									},
									{
										text: '留凤村',
										value: 'C2',
										children: [

											{
												text: '波浩坡',
												value: 'a'
											},
											{
												text: '泗贵坡',
												value: 'b'
											},
											{
												text: '杨屋坡',
												value: 'b'
											},
											{
												text: '坛彭坡',
												value: 'b'
											},
											{
												text: '坛削坡',
												value: 'b'
											},
											{
												text: '刘屋坡',
												value: 'b'
											},
											{
												text: '李屋坡',
												value: 'b'
											},
											{
												text: '谢屋坡',
												value: 'b'
											},
											{
												text: '池造坡',
												value: 'b'
											},
											{
												text: '韦屋坡',
												value: 'b'
											},
											{
												text: '花头坡',
												value: 'c'
											}
										]
									},
									{
										text: '南阳村',
										value: 'C3',
										children: [

											{
												text: '国荣坡',
												value: 'a'
											},
											{
												text: '坛湴坡',
												value: 'b'
											},
											{
												text: '河洞坡',
												value: 'b'
											},
											{
												text: '田西坡',
												value: 'b'
											},
											{
												text: '井坡',
												value: 'b'
											},
											{
												text: '新村坡',
												value: 'b'
											},
											{
												text: '国红坡',
												value: 'b'
											},
											{
												text: '坛窝坡',
												value: 'b'
											},
											{
												text: '那了坡',
												value: 'b'
											},
											{
												text: '国空坡',
												value: 'b'
											},
											{
												text: '坛桑坡',
												value: 'b'
											},
											{
												text: '那冷坡',
												value: 'b'
											},
											{
												text: '那世坡',
												value: 'b'
											}
										]
									},
									{
										text: '施厚村',
										value: 'C4',
										children: [

											{
												text: '古岳坡',
												value: 'a'
											},
											{
												text: '磊年坡',
												value: 'b'
											},
											{
												text: '大罗坡',
												value: 'b'
											},
											{
												text: '时笋坡',
												value: 'b'
											},
											{
												text: '塘厚坡',
												value: 'b'
											},
											{
												text: '坛河坡',
												value: 'b'
											},
											{
												text: '平沙坡',
												value: 'b'
											},
											{
												text: '坛姜坡',
												value: 'b'
											}
										]
									},
									{
										text: '新光村',
										value: 'C5',
										children: [

											{
												text: '那平坡',
												value: 'a'
											},
											{
												text: '大罗坡',
												value: 'a'
											},
											{
												text: '黎明坡',
												value: 'b'
											},
											{
												text: '新兴坡',
												value: 'b'
											},
											{
												text: '北歪坡',
												value: 'b'
											},
											{
												text: '仲领坡',
												value: 'b'
											},
											{
												text: '坛逢坡',
												value: 'b'
											}
										]
									},
									{
										text: '新楼村',
										value: 'C6',
										children: [

											{
												text: '上甘坡',
												value: 'a'
											},
											{
												text: '新楼坡',
												value: 'b'
											},
											{
												text: '大黎坡',
												value: 'b'
											},
											{
												text: '下甘坡',
												value: 'b'
											}
										]
									},
									{
										text: '雄会村',
										value: 'C7',
										children: [

											{
												text: '杨会坡',
												value: 'b'
											},
											{
												text: '南雄坡',
												value: 'b'
											},
											{
												text: '十冬坡',
												value: 'b'
											}
										]
									}
								]
							},
							{
								text: '刘圩镇',
								value: 'D',
								children: [{
										text: '刘圩镇',
										value: 'special'
									},
									{
										text: '大里村',
										value: 'D1',
										children: [

											{
												text: '那崛坡',
												value: 'a'
											},
											{
												text: '大里坡',
												value: 'b'
											},
											{
												text: '苏坡',
												value: 'b'
											},
											{
												text: '那稔坡',
												value: 'b'
											}
										]
									},
									{
										text: '槐里村',
										value: 'D2',
										children: [

											{
												text: '坛蒙坡',
												value: 'a'
											},
											{
												text: '和里坡',
												value: 'b'
											},
											{
												text: '坛槐坡',
												value: 'b'
											},
											{
												text: '坛青坡',
												value: 'b'
											},
											{
												text: '那止坡',
												value: 'b'
											},
											{
												text: '坛龙坡',
												value: 'b'
											}
										]
									},
									{
										text: '良合村',
										value: 'D3',
										children: [

											{
												text: '屯苏坡',
												value: 'a'
											},
											{
												text: '那布坡',
												value: 'a'
											},
											{
												text: '良珍坡',
												value: 'b'
											},
											{
												text: '良住坡',
												value: 'b'
											},
											{
												text: '屯凌坡',
												value: 'b'
											},
											{
												text: '那晃坡',
												value: 'b'
											}
										]
									},
									{
										text: '刘圩村',
										value: 'D4',
										children: [

											{
												text: '刘圩街',
												value: 'a'
											},
											{
												text: '罗坡',
												value: 'a'
											},
											{
												text: '坛两坡',
												value: 'b'
											},
											{
												text: '中兴坡',
												value: 'b'
											},
											{
												text: '大刘坡',
												value: 'c'
											},
											{
												text: '那硬坡',
												value: 'c'
											}
										]
									},
									{
										text: '禄强村',
										value: 'D5',
										children: [

											{
												text: '禄强坡',
												value: 'a'
											}
										]
									},
									{
										text: '麓阳村',
										value: 'D6',
										children: [

											{
												text: '新阳坡',
												value: 'a'
											},
											{
												text: '启蒙坡',
												value: 'b'
											},
											{
												text: '六阳坡',
												value: 'b'
											}
										]
									},
									{
										text: '那床村',
										value: 'D7',
										children: [{
											text: '那床坡',
											value: 'a'
										}]
									},
									{
										text: '那度村',
										value: 'D8',
										children: [{
												text: '那度坡',
												value: 'a'
											},
											{
												text: '坛覃坡',
												value: 'a'
											}
										]
									},
									{
										text: '那救村',
										value: 'D9',
										children: [

											{
												text: '梁村坡',
												value: 'a'
											},
											{
												text: '那救坡',
												value: 'b'
											},
											{
												text: '平和坡',
												value: 'b'
											},
											{
												text: '钟坡',
												value: 'b'
											},
											{
												text: '时畅坡',
												value: 'c'
											},
											{
												text: '里朗坡',
												value: 'c'
											}
										]
									},
									{
										text: '那里村',
										value: 'D10',
										children: [

											{
												text: '那任坡',
												value: 'a'
											},
											{
												text: '覃坡',
												value: 'b'
											},
											{
												text: '良伟坡',
												value: 'b'
											},
											{
												text: '那旺坡',
												value: 'b'
											},
											{
												text: '力林坡',
												value: 'b'
											},
											{
												text: '山泽坡',
												value: 'b'
											},
											{
												text: '那里坡',
												value: 'b'
											}
										]
									},
									{
										text: '那烈村',
										value: 'D11',
										children: [{
											text: '那烈坡',
											value: 'b'
										}]
									},
									{
										text: '三籁村',
										value: 'D12',
										children: [{
											text: '三籁坡',
											value: 'a'
										}]
									},
									{
										text: '谭村',
										value: 'D13',
										children: [{
											text: '谭村坡',
											value: 'a'
										}]
									},
									{
										text: '团黄村',
										value: 'D14',
										children: [{
											text: '团黄坡',
											value: 'a'
										}]
									}
								]
							},
							{
								text: '仙葫开发区',
								value: 'E',
								children: [{
										text: '仙葫开发区',
										value: 'special'
									},
									{
										text: '德福村',
										value: 'E1',
										children: [

											{
												text: '北尧坡',
												value: 'b'
											},
											{
												text: '大冲坡',
												value: 'b'
											},
											{
												text: '粟屋坡',
												value: 'b'
											},
											{
												text: '六律坡',
												value: 'b'
											},
											{
												text: '坛板坡',
												value: 'c'
											},
											{
												text: '新坡',
												value: 'c'
											},
											{
												text: '窑上坡',
												value: 'c'
											},
											{
												text: '江口坡',
												value: 'c'
											},
											{
												text: '福庆坡',
												value: 'c'
											}
										]
									},
									{
										text: '莫村社区',
										value: 'E2',
										children: [{
											text: '莫村坡',
											value: 'a'
										}]
									},
									{
										text: '那舅社区',
										value: 'E3',
										children: [

											{
												text: '曾屋坡',
												value: 'a'
											},
											{
												text: '莫屋坡',
												value: 'b'
											},
											{
												text: '英歌坡',
												value: 'b'
											},
											{
												text: '那平坡',
												value: 'c'
											},
											{
												text: '罗村坡',
												value: 'c'
											},
											{
												text: '周屋坡',
												value: 'c'
											},
											{
												text: '细那舅坡',
												value: 'c'
											},
											{
												text: '新塘坡',
												value: 'c'
											},
											{
												text: '大那舅坡',
												value: 'c'
											},
											{
												text: '那额坡',
												value: 'c'
											},
											{
												text: '杨村坡',
												value: 'c'
											},
											{
												text: '剪刀坡',
												value: 'c'
											},
											{
												text: '新华坡',
												value: 'c'
											},
											{
												text: '新村坡',
												value: 'c'
											},
											{
												text: '江口坡',
												value: 'c'
											},
											{
												text: '那楼坡',
												value: 'c'
											}
										]
									},
									{
										text: '五合社区',
										value: 'E4',
										children: [{
												text: '花里坡',
												value: 'a'
											},
											{
												text: '那塔坡',
												value: 'b'
											},
											{
												text: '大通坡',
												value: 'b'
											},
											{
												text: '坛岑坡',
												value: 'b'
											},
											{
												text: '坛咘坡',
												value: 'c'
											},
											{
												text: '那秀坡',
												value: 'c'
											},
											{
												text: '牛湾大坡',
												value: 'c'
											},
											{
												text: '牛湾中坡',
												value: 'c'
											},
											{
												text: '子垒坡',
												value: 'c'
											},
											{
												text: '定禁坡',
												value: 'c'
											},
											{
												text: '那窝扶贫安置场',
												value: 'c'
											},
											{
												text: '花陈坡',
												value: 'c'
											},
											{
												text: '那律坡',
												value: 'c'
											}
										]
									}
								]
							}
						]
					}],
					testList: [],
					data: '',
				},
				ifshow: true,
				Image: '',
				addrDel: '',
				uploadPromises:[],
				photoData: [],
				photoArray: [],
				canvasWidth: '',
				canvasHeight: '',
				canvasnone: '',
				photoIndex: 0,
				photoData: '',
				fileData: null
			}
		},
		onLoad() {
			// this.isclear = this.$store.state.isclear
			this.name = this.$store.state.user_name
			console.log(this.name)
			uni.getStorage({
				key: 'alldecifm',
				success: res => {
					console.log('可以了')
					console.log(res)
					this.$store.state.decifm = res.data
					console.log(this.$store.state.decifm)
					// for(var i=0;i<this.$store.state.decifm.length;i++){
					// 	for(var j=0;j<this.$store.state.decifm[i].Imageall.length;j++){
					// 		var url = {
					// 			// name:'file',
					// 			url:this.$store.state.decifm[i].Imageall[j].Image
					// 		}
					// 		this.len.push(url)
					// 	}
					// }
					// console.log(this.len)
					// console.log(this.$store.state.alltownscore)
					// console.log(this.$store.state.alltownscore.length)
					// console.log(this.$store.state.value)
					// console.log(this.$store.state.allcountrysidescore)
					// console.log(this.$store.state.allcountrysidescore.length)
					// for(var i=0;i<this.allpoint.length;i++){
					// 	this.len.push(this.allpoint[i].Imageall.length)
					// 	this.pot.push(this.allpoint[i].point)
					// }
					// console.log(this.len)
					// console.log(this.pot)
				}
			})
			uni.getStorage({
				key:'town',
				success: (res) => {
					console.log(res)
					this.$store.state.alltownscore = res.data
					
				},
				fail: (error) => {
					console.log(error)
				}
			})
			uni.getStorage({
				key:'countryside',
				success: (res) => {
					console.log(res)
					this.$store.state.allcountrysidescore = res.data
					console.log(this.$store.state.allcountrysidescore)
				}
			})
		},
		mounted() {},
		methods: {
			start() {
				if (this.locaval == 'A' || this.locaval == 'B' || this.locaval == 'C' || this.locaval == 'D' || this
					.locaval == 'E') {
					uni.showModal({
						title: '提示',
						content: '您选择的该考评对象为镇区考评，请确定是否继续进行',
						success: res => {
							if (res.confirm) {
								console.log('用户点击确定')
								this.islistfirst = true
								this.isbtn = false
								this.thisview = false
								this.selectlay = false
								if(this.locaval == 'A' || this.locaval == 'B'){
									this.$store.state.score = 5
								} else {
									this.$store.state.score = 6
								}
							} else {
								console.log('用户点击取消')
							}
						}
					})
				} else {
					uni.showModal({
						title: '提示',
						content: '您选择的该考评对象为村屯考评，请确定是否继续进行',
						success: res => {
							if (res.confirm) {
								this.islistsecond = true
								this.isbtn = false
								this.thisview = false
								if(this.locaval == 'a'){
									this.$store.state.score = 5
								} else if(this.locaval == 'b'){
									this.$store.state.score = 6
								} else if(this.locaval == 'c'){
									this.$store.state.score = 7
								}
								console.log('用户点击确定')

							} else {
								console.log('用户点击取消')
							}
						}
					})
				}
			},
			end() {
				uni.showModal({
					title: '提示',
					content: '是否结束考评',
					success: res => {
						if (res.confirm) {
							this.all = this.$store.state.decifm
							console.log(this.all)
							
							var uploadPromises = [];
							
							for (var i = 0; i < this.all.length; i++) {
							  var textData = {
							    point: this.all[i].point,
							    location: this.$store.state.address
							  };
							
							  for (var j = 0; j < this.all[i].Imageall.length; j++) {
							    var remark = this.all[i].Imageall[j].remark;
							    var Image = this.all[i].Imageall[j].Image;
							
							    var uploadPromise = new Promise((resolve, reject) => {
							      uni.uploadFile({
							        url: 'http://111.230.59.120:80/kaoping/word_message/',
							        filePath: Image,
							        name: `file`,
							        formData: {
							          textData: JSON.stringify(textData),
							          remark: remark
							        },
							        header: {
							          'Content-Type': 'multipart/form-data'
							        },
							        success: (uploadFileRes) => {
							          console.log('发出去了');
							          console.log(uploadFileRes);
							          resolve(); // 标记上传成功
							        },
							        fail: (error) => {
							          console.log('文件上传失败');
							          console.log(error);
									  console.log(Image)
									  this.$store.state.fldecifm.push({
										   textData: textData,
										   remark: remark,
										   Image:Image
									  })
									  // this.uploadPromises.push({
										 //  point: this.all[i].point,
										 //  location: this.$store.state.address,
										 //  remark: this.all[i].Imageall[j].remark,
										 //  Image: this.all[i].Imageall[j].Image
									  // });
									  console.log(this.$store.state.fldecifm)
							          resolve(); // 标记上传失败
							        }
							      });
							    })
							
							    uploadPromises.push(uploadPromise);
							  }
							}
							
							Promise.all(uploadPromises)
							  .then(() => {
								  if(this.$store.state.fldecifm.length == 0){
									uni.showModal({
										title:'提示',
										content:'所有文件上传完成',
										showCancel:false,
										success: (res) => {
											if(res.confirm){
												this.$store.state.load = false
											}
										}
									})  
								  } 
								  else {
									console.log(this.$store.state.fldecifm)
									console.log(this.$store.state.fldecifm.length)
									uni.showModal({
										title:'提示',
										content:'网络超时，有文件上传出错,请检查好网络连接，点击确定再次上传文件',
										// showCancel:false,
										success: (res) => {
											if(res.confirm){
												var index = 0
												for(var i=0;i<this.$store.state.fldecifm.length;i++){
													var textData = this.$store.state.fldecifm[i].textData
													var remark = this.$store.state.fldecifm[i].remark
													var Image = this.$store.state.fldecifm[i].Image
													uni.uploadFile({
														url: 'http://111.230.59.120:80/kaoping/word_message/',
														filePath: Image,
														name: `file`,
														formData: {
															textData: JSON.stringify(textData),
															remark: remark
														},
														header: {
															'Content-Type': 'multipart/form-data'
														},
														success: (uploadFileRes) => {
															index += 1
															if(index == this.$store.state.fldecifm.length){
																uni.showModal({
																	title:'提示',
																	content:'文件上传完成',
																	success: (res) => {
																		this.$store.state.load = false
																	}
																})
															}
															console.log('发出去了')
															console.log(uploadFileRes)
														},
														fail: (error) => {
															console.log(error)
														}
													})
												}
											}
										}
									})  
								  }
								  
							    console.log('所有文件上传完成');
							    console.log('666');
							  })
							  .catch(() => {
								  uni.showModal({
								  	title:'提示',
									content:'网络超时，有文件上传出错'
								  })
							    console.log('有文件上传出错');
							  });
							  const sortedData = this.all.sort((a, b) => b.Imageall.length - a.Imageall.length);
							  this.$store.state.decifm = sortedData
							uni.setStorage({
								key:'alldecifm',
								data:this.$store.state.decifm,
								success: (res) => {
									console.log(this.$store.state.decifm)
									uni.reLaunch({
										url:'./scan/scan'
									})	
								}
							})
							// setTimeout(() => {
								
							// },10000)
							// let uploadPromises = this.all.flatMap((item, itemIndex) => {
							// 	let textData = {
							// 		point:item.point,
							// 		// name: item.name,
							// 		location:this.$store.state.address
							// 	};
							// 	let imageObjects = item.Imageall; // 取出图片对象数组

							// 	return imageObjects.map((imageObject, imageIndex) => {
							// 		let filePath = imageObject.Image; // 取出文件路径
							// 		let remark = imageObject.remark
							// 		// 返回一个新的 Promise
							// 		return new Promise((resolve, reject) => {
							// 			uni.uploadFile({
							// 				url: 'http://111.230.59.120:80/kaoping/word_message/', // 您的上传服务器接口地址
							// 				// files:this.len,
							// 				filePath: filePath,
							// 				name: `file`, 
							// 				formData:{
							// 					textData:JSON.stringify(textData),
							// 					remark:remark
							// 				},
							// 				header: {
							// 					'Content-Type': 'multipart/form-data' // 注意这里的Content-Type需要改变
							// 				},
							// 				success: (uploadFileRes) => {
							// 					console.log('发出去了');
							// 					console.log(uploadFileRes);
							// 					resolve(uploadFileRes);
							// 				},
							// 				fail: (error) => {
							// 					console.log('文件上传失败');
							// 					console.log(error);
							// 					reject(error);
							// 				}
							// 			});
							// 		})
							// 	})
							// })
													// uni.setStorage({
							// 	key: 'alldecifm',
							// 	data: this.$store.state.decifm,
							// 	success: () => {
							uni.showToast({
								title:'结算成功'
							})
						} else {
							console.log('没了')
						}
						console.log('退出了')

					}
				})
			},
			getTime() {
				var date = new Date(),
					year = date.getFullYear(),
					month = date.getMonth() + 1,
					day = date.getDate(),
					hour = date.getHours() < 10 ? "0" + date.getHours() : date
					.getHours(),
					minute = date.getMinutes() < 10 ? "0" + date.getMinutes() : date
					.getMinutes(),
					second = date.getSeconds() < 10 ? "0" + date.getSeconds() : date
					.getSeconds();
				month >= 1 && month <= 9 ? (month = "0" + month) : "";
				day >= 0 && day <= 9 ? (day = "0" + day) : "";
				var timer = year + '-' + month + '-' + day + ' ' + hour + ':' +
					minute + ':' + second;
				return timer;
			},
			test() {
				console.log(this.testList[0].id)
			},
			changePicker(e) {
				console.log(e)
				var that = this
				console.log(that.user.nowmonth)
				console.log(e);
				that.showlocation = true
				that.address = e
				console.log(e.detail.value[2].value)
				if (e.detail.value[2].value == 'special') {
					that.taddress = e.detail.value[0].text + e.detail.value[1].text
					that.locaval = e.detail.value[1].value
					console.log(that.locaval)
					console.log(that.taddress)
					console.log('1')
				} else if (!e.detail.value[3] && e.detail.value[2].value !=
					'special') {
					that.taddress = e.detail.value[0].text + e.detail.value[1].text + e
						.detail.value[2].text
					console.log(that.locaval)
					console.log(that.taddress)
					console.log('2')
				} else {
					that.taddress = e.detail.value[0].text + e.detail.value[1].text + e
						.detail.value[2].text + e.detail
						.value[3].text
					that.locaval = e.detail.value[3].value
					console.log(that.locaval)
					console.log(that.taddress)
					console.log('3')
				}
				this.btngetl = true
				that.$store.state.value = that.locaval
				console.log(that.$store.state.value)
				console.log(that.taddress)
				console.log(that.address)
				// uni.setStorage({
				// 	key:'month',
				// 	data:{
				// 		thisview: this.thisview,
				// 		selectlay: this.selectlay,
				// 		unidatapicker: this.unidatapicker,
				// 		btngetl: this.btngetl,
				// 		islocation: this.islocation,
				// 		kkp: this.kkp,
				// 		isbtn: this.isbtn,
				// 		islistsecond: this.islistsecond,
				// 		islistfirst: this.islistfirst,
				// 		thislocation: this.thislocation,
				// 		taddress:this.taddress,
				// 		usermonth:this.user.nowmonth,
				// 		location:this.thislocation,
				// 		address:this.address
				// 	},
				// 	success:res=>{
				// 		console.log(res)
				// 	}
				// })
			},
			selectmonth(index, item) {
				console.log(item)
				console.log('selectmonth')
				if (index >= 0) {
					console.log('jquiselectmonth')
					this.user.nowmonth = item.value;
					this.showobj = true
					this.unidatapicker = true
					console.log(this.user.nowmonth)
					// uni.setStorage({
					// 	key:'month',
					// 	data:{
					// 		thisview: this.thisview,
					// 		selectlay: this.selectlay,
					// 		unidatapicker: this.unidatapicker,
					// 		btngetl: this.btngetl,
					// 		islocation: this.islocation,
					// 		kkp: this.kkp,
					// 		isbtn: this.isbtn,
					// 		islistsecond: this.islistsecond,
					// 		islistfirst: this.islistfirst,
					// 		thislocation: this.thislocation,
					// 		taddress:this.taddress,
					// 		usermonth:this.user.nowmonth,
					// 		location:this.thislocation
					// 	},
					// 	success:res=>{
					// 		console.log(res)
					// 	}
					// })
				}

			},
			getloca() {
				this.showtest = true
			},
			clear() {
				// this.user.nowmonth = ''
			},
			xqgl() {

			},
			clickfirst(e) {
				console.log(e)
				console.log(typeof(e.id))
				console.log('hahahahahahahah')
				uni.navigateTo({
					url: './town/' + e.id,
				})
			},
			clicksecond(e) {
				console.log(e)
				uni.navigateTo({
					url: './countryside/' + e.id
				})
			},
			getl() {
				var that = this
				uni.showLoading({
					title: '定位中...',
					mask: true
				})
				uni.getLocation({
					type: 'wgs84',
					geocode: true,
					success: function(res) {
						that.kkp = false
						that.islocation = true
						that.latitude = res.latitude
						that.longitude = res.longitude
						// that.thislocation = res.location
						console.log(res)
						uni.request({
							url: 'http://111.230.59.120:80/kaoping/location/',
							method: 'POST',
							data: {
								name: that.name,
								lat2: that.latitude,
								lng2: that.longitude,
								location: that.taddress,
							},
							success: res => {
								console.log(res)
								console.log(that.name)
								console.log(that.latitude)
								console.log(that.longitude)
								console.log(that.taddress)
								if (res.data.code == 400) {
									console.log(res)
									that.dat = res;
									that.thislocation = res.data.msg
									that.$store.state.address = res.data.msg
									that.res = res.data.code
									uni.hideLoading()
									console.log('对了')
									console.log(res)
									uni.showToast({
										title: "获取成功",
										icon: "success",
									})
								} else if(res.data.code == 200){
									console.log(res)
									that.dat = res;
									that.thislocation = res.data.msg
									that.$store.state.address = res.data.msg
									that.res = res.data.code
									uni.hideLoading()
									console.log('对了')
									console.log(res)
									uni.showToast({
										title: "获取成功",
										icon: "success",
									})
								}else if(res.statusCode == 500){
									uni.showToast({
										title:'服务器出错',
										icon:'error'
									})
								} else {
									uni.hideLoading()
									uni.showToast({
										title:res.data.msg,
										icon: 'none'
									})
								}
							},
							fail: error => {
								uni.showModal({
									title: '提示',
									content: '定位失败，请确定是否进行考评',
									success: res => {
										console
											.log(
												res
											)
										if (res
											.confirm
										) {

										}
									}
								})
							}
						})

					},
					fail: function() {
						uni.hideLoading()
						uni.showToast({
							title: '网络错误,请检查网络连接',
							icon: 'none'
						});
					}
				})
			}
		},
	}
</script>

<style>
	.bottom-btn {
		position: fixed;
		margin-top: 20rpx;
		width: 100%;
		bottom: 0rpx;
	}

	.ig {
		width: 100rpx;
		height: 100rpx;
	}

	.table {
		width: 750rpx;
		height: 100rpx;
		background-color: #F8F8FF;
		border: 1rpx solid skyblue;
		margin-top: 15rpx;
		text-align: center;
		font-size: 55rpx;
	}

	.image {
		width: 100%;
		height: 300rpx;
		background-color: pink;
	}

	.chooseimg {
		width: 100rpx;
		height: 100rpx;
	}
</style>